Feat : Chapter 8. API & Swagger & Annotation#9
Merged
infiniment merged 1 commit intodevelopfrom Nov 11, 2025
Merged
Conversation
ggamnunq
reviewed
Nov 12, 2025
| import com.example.umc9th.global.apiPayload.exception.GeneralException; | ||
|
|
||
| public class FoodException extends GeneralException { | ||
| public FoodException(BaseErrorCode code) { |
| @RequestParam(required = false) String query | ||
| ) { | ||
| List<Review> list = reviewQueryService.searchMyReviews(memberId, type, query); | ||
| ReviewResDTO.MyReviews dto = ReviewConverter.toMyReviews(list); |
| @GetMapping("/reviews/me") | ||
| public ApiResponse<ReviewResDTO.MyReviews> myReviews( | ||
| @RequestParam Long memberId, | ||
| @RequestParam(required = false) String type, |
There was a problem hiding this comment.
필수값이 아닐 때는 이후 비즈니스 로직에서 null에 대한 처리를 잘 해주세요!
| @RequiredArgsConstructor | ||
| public class FoodExistValidator implements ConstraintValidator<ExistFoods, List<Long>> { | ||
|
|
||
| private final FoodRepository foodRepository; |
There was a problem hiding this comment.
repository 코드에 접근하는건 웬만하면 service 코드에서만 해주세요
| import org.springframework.context.annotation.Configuration; | ||
| import org.springframework.data.jpa.repository.config.EnableJpaAuditing; | ||
|
|
||
| @Configuration |
There was a problem hiding this comment.
이 부분은 스터디에서 말씀드리긴 했는데,
@EnableJpaAuditing 이 어노테이션은 SpringBootApplication.java에 붙여줘도 됩니당
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.